package com.uzai.console.web.fd;

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSort;
import com.uzai.console.annotation.SystemLogType;
import com.uzai.console.dto.fd.fdfollowconfigqf.FdFollowConfigQfDto;
import com.uzai.console.dto.fd.fdfollowconfigqf.FdFollowConfigQfIdDto;
import com.uzai.console.dto.fd.fdfollowconfigqf.FdFollowConfigQfQuery;
import com.uzai.console.dto.fd.fdfollowconfigqf.FdFollowConfigQfStatusDto;
import com.uzai.console.enums.OperationTypeEnum;
import com.uzai.console.enums.SystemModelEnum;
import com.uzai.console.service.fd.FdFollowConfigQfService;
import com.uzai.console.vo.fd.fdfollowconfigqf.FdFollowConfigQfVo;
import com.uzai.console.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * 发单气氛组自动跟发配置
 * @author liuqi
 * @date 2021年08月16日 15:11
 */
@Api(value = "气氛组自动跟发配置",tags = "个人微信|发单|气氛组自动跟发配置")
@ApiSort(104)
@RestController
public class FdFollowConfigQfController extends BaseController {
    private Logger logger = LoggerFactory.getLogger(FdFollowConfigQfController.class);

    @Autowired
    private FdFollowConfigQfService fdFollowConfigQfService;

    @ApiOperation(value = "分页查询气氛组自动跟发配置列表", notes = "分页查询气氛组自动跟发配置列表", response = FdFollowConfigQfVo.class)
    @ApiOperationSupport(order = 1)
    @PostMapping("/fdFollowConfigQf/findFdFollowConfigQfList")
    public Object findFdFollowConfigQfList(@RequestBody FdFollowConfigQfQuery fdFollowConfigQfQuery){
        return fdFollowConfigQfService.findFdFollowConfigQfList(fdFollowConfigQfQuery);
    }

    @SystemLogType(model = SystemModelEnum.FdFollowConfigQf, type = OperationTypeEnum.ADD)
    @ApiOperation(value = "添加气氛组自动跟发配置", notes = "添加气氛组自动跟发配置")
    @ApiOperationSupport(order = 2)
    @PostMapping("/fdFollowConfigQf/addFdFollowConfigQf")
    public Object addFdFollowConfigQf(@RequestBody FdFollowConfigQfDto fdFollowConfigQfDto){
        fdFollowConfigQfService.addFdFollowConfigQf(fdFollowConfigQfDto);
        return true;
    }

    @SystemLogType(model = SystemModelEnum.FdFollowConfigQf, type = OperationTypeEnum.UPDATE)
    @ApiOperation(value = "编辑气氛组自动跟发配置", notes = "编辑气氛组自动跟发配置" )
    @ApiOperationSupport(order = 3)
    @PostMapping("/fdFollowConfigQf/updateFdFollowConfigQf")
    public Object updateFdFollowConfigQf(@RequestBody FdFollowConfigQfDto fdFollowConfigQfDto){
        fdFollowConfigQfService.updateFdFollowConfigQf(fdFollowConfigQfDto);
        return true;
    }

    @SystemLogType(model = SystemModelEnum.FdFollowConfigQf, type = OperationTypeEnum.DELETE)
    @ApiOperation(value = "删除气氛组自动跟发配置", notes = "删除气氛组自动跟发配置")
    @ApiOperationSupport(order = 4)
    @PostMapping("/fdFollowConfigQf/deleteFdFollowConfigQf")
    public Object deleteFdFollowConfigQf(@RequestBody FdFollowConfigQfIdDto fdFollowConfigQfIdDto){
        fdFollowConfigQfService.deleteFdFollowConfigQf(fdFollowConfigQfIdDto);
        return true;
    }

    @ApiOperation(value = "查询气氛组自动跟发配置详情", notes = "查询气氛组自动跟发配置详情", response = FdFollowConfigQfVo.class)
    @ApiOperationSupport(order = 5)
    @PostMapping("/fdFollowConfigQf/findFdFollowConfigQf")
    public Object findFdFollowConfigQf(@RequestBody FdFollowConfigQfIdDto fdFollowConfigQfIdDto){
        return fdFollowConfigQfService.findFdFollowConfigQf(fdFollowConfigQfIdDto);
    }

    @ApiOperation(value = "开启关闭气氛组自动跟发配置", notes = "开启关闭气氛组自动跟发配置", response = Boolean.class)
    @ApiOperationSupport(order = 6)
    @PostMapping("/fdFollowConfigQf/updateStatus")
    public Object updateStatus(@RequestBody FdFollowConfigQfStatusDto fdFollowConfigQfStatusDto){
        fdFollowConfigQfService.updateStatus(fdFollowConfigQfStatusDto);
        return true;
    }

}
